#include <bits/stdc++.h>
using namespace std;
typedef long long LL;

int main() {
    LL n;
    LL t;
    while (~scanf("%lld", &n)) {
        LL res = 0;
        for (LL i=1; i<=n; ++i) {
            scanf("%lld", &t);
            if (t<0) res += (i*t);
            else res += t;
        }
        printf("%lld\n", res);
    }
    return 0;
}
